#!/usr/bin/env python
# -*- coding:utf-8 -*-


import sys

import avro.ipc as ipc
import avro.protocol as protocol

PROTOCOL = protocol.parse(open("./arpc_test.avro").read())

server_addr = ('localhost', 8088)

if __name__ == '__main__':
    client = ipc.HTTPTransceiver(server_addr[0], server_addr[1])
    requestor = ipc.Requestor(PROTOCOL, client)
    
    user = dict()
    user['name'] = "ZhenQin"

    params = dict()
    params['user'] = user;
    m = requestor.request('sayHello', params)
    requestor.close()
